package org.system.core.mapper.system;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.system.core.domain.entity.SysDept;

import java.util.List;

/**
* @author baoRoot
* @description 针对表【sys_dept(部门表)】的数据库操作Mapper
* @createDate 2024-11-05 14:17:49
* @Entity org.system.core.domain.entity.SysDept
*/
@Mapper
public interface SysDeptMapper {

    List<SysDept> selectDeptList(SysDept dept);
    SysDept selectDeptById(Long deptId);
    SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
    int insertDept(SysDept dept);
    int selectNormalChildrenDeptById(Long deptId);
    List<SysDept> selectChildrenDeptById(Long deptId);
    int updateDeptChildren(@Param("depts") List<SysDept> depts);
    int updateDept(SysDept dept);
    void updateDeptStatusNormal(Long[] deptIds);
    int hasChildByDeptId(Long deptId);
    int checkDeptExistUser(Long deptId);
    int deleteDeptById(Long deptId);
    List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
}




